package src.main.java.org.ooppro.staticDemo.block;

public class Student {
    static int number = 99;
    static String schoolName;
    //静态代码块只执行一次
    static {
        System.out.println("静态代码块执行了");
        schoolName = "清华";
    }
    {
        //实例代码块,比构造器先执行
        System.out.println("实例代码块执行了");
    }
    public Student(){
        System.out.println("无参构造器");
    }
}
